<!DOCTYPE html>
<html>
	<head>
        <meta charset="utf-8" />
		<#assign base=request.contextPath  />
        <base id="basePath" href="${base}">
        <link rel="stylesheet" type="text/css" href="${base}/js/layui/css/layui.css"/>
        <script src="${base}/js/layui/layui.all.js"></script>
        <script type="text/javascript" src="${base}/js/zhang.js"></script>
        <link rel="stylesheet" href="${base}/css/demo.css" type="text/css">
        <link rel="stylesheet" href="${base}/css/zTreeStyle.css" type="text/css">
        <script type="text/javascript" src="${base}/js/ztree/jquery-1.4.4.min.js"></script>
        <script type="text/javascript" src="${base}/js/ztree/jquery.ztree.core.js"></script>
        <script type="text/javascript" src="${base}/js/zhang.js"></script>
        <script type="text/javascript" src="${base}/js/ztree/jquery.ztree.excheck.js"></script>
        <script type="text/javascript" src="${base}/js/ztree/jquery.ztree.exedit.js"></script>
</head>
<body>
 
<table class="layui-hide" id="test" lay-filter="test"></table>    
<script>
layui.use('table', function(){
  var table = layui.table;
  
  table.render({
    elem: '#test'
    ,url:'${base}/financialDaily/selectdaymoney2?res=${res}'
    ,toolbar: '#toolbarDemo'
    ,title: '用户数据表'
    ,totalRow: true
    ,cols: [[
		{field:'id', title:'ID', templet:function(val){
                return val.LAY_INDEX
            },width:60,align:'center', field: 'left', unresize: true, totalRowText: '合计', rowspan: 2}
      //,{field:'username', title:'日期',align:'center', rowspan: 2}
      //,{field:'experience', title:'费用名称',align:'center', rowspan: 2}
      ,{field: 'city', title: '收入',colspan: 3,align:'center'}
      ,{field: 'city2', title: '支出',colspan: 3,align:'center'}
      //,{field:'ip', title:'余额',align:'center', rowspan: 2}
      ,{field:'remarks', title:'备注',align:'center', rowspan: 2}
      ], [
       {field:'incomeMoney', title:'现金',align:'center',  totalRow: true}
      ,{field:'typeExpenditure', title:'类型',align:'center', totalRow: true}
        ,{field: 'person', title: '录入人',align:'center'}

          ,{field:'expenditureMoney', title:'现金',align:'center', totalRow: true}
      ,{field:'incomeType', title:'类型',align:'center', totalRow: true}
          ,{field: 'person', title: '录入人',align:'center'}

      ]]
     , page: {
                layout: ['limit', 'count', 'prev', 'page', 'next', 'skip'] //自定义分页布局
                , theme: '#0092EF'
                , limit: 20
            }
  });
});
</script>

</body>
</html>